﻿<UserControl x:Class="VSMantisConnect.Views.SettingsView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:ui="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell.14.0"
             xmlns:local="clr-namespace:VSMantisConnect"
             mc:Ignorable="d"
             d:DesignHeight="300" d:DesignWidth="300" Name="settingWindow"  >

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="25"/>
            <RowDefinition Height="25"/>
            <RowDefinition Height="25"/>
            <RowDefinition Height="25"/>
            <RowDefinition Height="25"/>
            <RowDefinition Height="25"/>
            <RowDefinition Height="25"/>
            <RowDefinition Height="25"/>
            <RowDefinition Height="25"/>
			<RowDefinition Height="25"/>
			<RowDefinition Height="25"/>
			<RowDefinition Height="25"/>
			<RowDefinition Height="40"/>
            <RowDefinition Height="25*"/>

        </Grid.RowDefinitions>
        <!-- Mantis configuration -->
        <Label Name="lblBaseUrl" Content="#Mantis base url#" VerticalAlignment="Center" Style="{DynamicResource {x:Static ui:VsResourceKeys.ThemedDialogLabelStyleKey}}" />
        <TextBox Name="tbxBaseUrl" Grid.Row="1" Margin="5,0" VerticalAlignment="Center" TextChanged="tbx_TextChanged" Style="{DynamicResource {x:Static ui:VsResourceKeys.TextBoxStyleKey}}" />
        <CheckBox Name="ckbCustomizeEndPoint" IsChecked="False" Content="#Customize endpoint address#" Grid.Row="2" VerticalAlignment="Center" Style="{DynamicResource {x:Static ui:VsResourceKeys.CheckBoxStyleKey}}" Unchecked="control_ValueChanged" Checked="control_ValueChanged"/>
        <Label Name="lblEndpoint" Grid.Row="3" Content="#Mantis connect enpoint address#" VerticalAlignment="Center" Style="{DynamicResource {x:Static ui:VsResourceKeys.ThemedDialogLabelStyleKey}}"/>
        <TextBox Name="tbxEndPointAddress" Grid.Row="4" IsEnabled="{Binding ElementName=ckbCustomizeEndPoint, Path=IsChecked}" Margin="5,0" VerticalAlignment="Center" TextChanged="tbx_TextChanged" Style="{DynamicResource {x:Static ui:VsResourceKeys.TextBoxStyleKey}}"/>
        <!-- user configuration -->
        <Label Grid.Row="5" Name="lblUsername" Content="#Username#" VerticalAlignment="Center" Style="{DynamicResource {x:Static ui:VsResourceKeys.ThemedDialogLabelStyleKey}}"/>
        <TextBox Grid.Row="6" Name="tbxUsername" VerticalAlignment="Center" Margin="2,0" TextChanged="tbx_TextChanged" Style="{DynamicResource {x:Static ui:VsResourceKeys.TextBoxStyleKey}}"/>
        <Label Grid.Row="7" Name="lblPassword" Content="#Password#" VerticalAlignment="Center" Style="{DynamicResource {x:Static ui:VsResourceKeys.ThemedDialogLabelStyleKey}}"/>
        <PasswordBox Grid.Row="8" Name="tbxPassword" VerticalAlignment="Center" Margin="2,0" PasswordChanged="tbxPassword_PasswordChanged" Background="{DynamicResource {x:Static ui:VsBrushes.ComboBoxBackgroundKey}}" Foreground="{DynamicResource {x:Static ui:VsBrushes.CaptionTextKey}}" />
        <CheckBox Grid.Row="9" Name="ckbSavePassword" Content="#Save password#" VerticalAlignment="Center" Style="{DynamicResource {x:Static ui:VsResourceKeys.CheckBoxStyleKey}}" Checked="control_ValueChanged" Unchecked="control_ValueChanged"/>
		<Label Grid.Row="10" x:Name="lblLanguage" Content="#Language#" VerticalAlignment="Center" Style="{DynamicResource {x:Static ui:VsResourceKeys.ThemedDialogLabelStyleKey}}"/>
		<ComboBox x:Name="cbxLanguage" Grid.Row="11" Margin="2,0" ItemsSource="{Binding}" Style="{DynamicResource {x:Static ui:VsResourceKeys.ComboBoxStyleKey}}" SelectionChanged="cbxLanguage_SelectionChanged">
			<ComboBox.ItemTemplate>
				<DataTemplate>
					<Label Content="{Binding DisplayName}" Style="{DynamicResource {x:Static ui:VsResourceKeys.ThemedDialogLabelStyleKey}}" />
				</DataTemplate>
			</ComboBox.ItemTemplate>
		</ComboBox>
		<Button Grid.Row="12" Name="btnSave" Content="#Save#" VerticalAlignment="Center" HorizontalAlignment="Left" Padding="5" Margin="5,0" Click="btnSave_Click" Style="{DynamicResource {x:Static ui:VsResourceKeys.ThemedDialogButtonStyleKey}}" />
		<Button Grid.Row="12" Name="btnTest" Content="#Test connection#" VerticalAlignment="Center" HorizontalAlignment="Right" Padding="5" Margin="5,0" Click="btnTest_Click" Style="{DynamicResource {x:Static ui:VsResourceKeys.ThemedDialogButtonStyleKey}}" />
    </Grid>
</UserControl>
